package com.wxl.asmgradleplugin.demo.asm

import android.util.Log

object LogUtil {

    private const val TAG = "LogUtil"

    private var mTime: Long = 0

    @JvmStatic
    fun refreshTime(packageName: String, functionName: String) {
        Log.i(TAG, "refreshTime:$packageName/$functionName")
        mTime = System.currentTimeMillis()
    }

    @JvmStatic
    fun calFuncTime(packageName: String, functionName: String) {
        Log.i(
            TAG,
            "path:" + packageName + "/" + functionName + "---:" + (System.currentTimeMillis() - mTime) + " ms"
        )
    }
}
